#include "stdafx.h"
#include "Core.h"
#include <iostream>

using std::string;				using std::cout;
using std::ofstream;			using std::cerr;
using std::runtime_error;

int _tmain(int argc, _TCHAR* argv[])
{
	__asm {	
	};

	string result;

	try
	{
		// Create a compiler core with a file path
		Core* core = new Core("C:\\Users\\mmartineau\\Desktop\\calc.txt");
		result = core->Compile();		
		delete core;	
	}
	catch(runtime_error err)
	{
		result = err.what();		
	}

	// Dump results to file
	ofstream fileStream = ofstream("C:\\Users\\mmartineau\\Desktop\\calcobj.txt");
	fileStream << result;
	fileStream.close();
	
	return 0;
}

